package class12;

import com.alibaba.fastjson.JSONObject;

public class JsonTest{
    public static void main(String[] args) {
        String json = "{\"a\":1}";
        JSONObject objects = JSONObject.parseObject(json);
        System.out.println(objects.get("a"));

        switch (json){
            case "a":
                System.out.println("不是这个值");
                break;
            case "{\"a\":1}":
                System.out.println("是设置的json");
                break;
        }

    }
}